package com.ethink.order.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ethink.order.api.info.SaleDetailOrderInfo;
import com.ethink.order.api.model.SaleDetailOrderModel;
import com.ethink.order.api.model.SaleOrderMateQtyModel;
import com.ethink.order.api.request.TocSaleAfterImportLogAddItemRequest;
import com.ethink.order.common.entity.SaleDetailOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * TOC销售详单 Mapper接口
 *
 * @author default
 * @date 2022-11-22
 */
@Mapper
public interface SaleDetailOrderMapper extends BaseMapper<SaleDetailOrder> {

    List<SaleDetailOrderModel> selectByOrderNo(String orderNo);

    List<SaleDetailOrderInfo> queryDetailListByOrderNo(String orderNo);

    List<String> querySaleOrderDetailOrderNoByOrderNo(List<String> orderNos);

    List<SaleDetailOrderInfo> queryDetailByTobOrderNo(@Param("tobOrderNo") String tobOrderNo);

    List<SaleOrderMateQtyModel> selectMateNumByChannelShopOrderNo(@Param("channel")String saleSubChannel, @Param("list") List<TocSaleAfterImportLogAddItemRequest> items);
}